package com.csmzxy.soft.comm;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Transaction {
	private Date transDate;
	private double amount;
	private String operation;
	
	public Transaction(double amount,String operation){
		this.transDate=new Date();
		this.amount=amount;
		this.operation=operation;
	}
	public Date getTransDate() {
		return transDate;
	}
	public void setTransDate(Date transDate) {
		this.transDate = transDate;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public String getOperation() {
		return operation;
	}
	public void setOperation(String operation) {
		this.operation = operation;
	}
	public String toString(){
		SimpleDateFormat df=new SimpleDateFormat("yyyyMMdd HHmmss");
		return df.format(transDate)+":"+operation+"￥"+amount;
	}
}
